import React from "react";
import NewsPublish from "../../../components/publish-manage/NewsPublish";
import usePublish from "./usePublish";
import {Button} from "antd";

export default function Unpublished() {
    // 使用自定义的Hooks
    const { dataSource, handlePublish }= usePublish(0)  // 0未发布

    return (
        <div>
            <NewsPublish dataSource={ dataSource }  button={(id)=><Button type="primary" onClick={()=>handlePublish(id)}>发布</Button>} />
        </div>
    );
}
